package com.summer.web.v1.enums;

public enum DerByEnums {

    // jdbc:derby:firstdb;create=true
    CONNECTION("jdbc:derby:user-platform;create=true", "创建数据库"),
    DROP_USER_TABLE("DROP TABLE users", "删除users表"),
    CREATE_USER_TABLE("CREATE TABLE users(" +
            "id INT NOT NULL PRIMARY KEY GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1), " +
            "name VARCHAR(16) NOT NULL, " +
            "password VARCHAR(64) NOT NULL, " +
            "email VARCHAR(64) NOT NULL, " +
            "phoneNumber VARCHAR(64) NOT NULL" +
            ")", "创建users表"),
    INSERT_USER_DML("INSERT INTO users(name,password,email,phoneNumber) VALUES " +
            "(?,?,?,?)", "新增user用户"),
    ;

    DerByEnums(String sql, String desc) {
        this.sql = sql;
        this.desc = desc;
    }

    public String sql;

    public String desc;


}
